#include "copyright.h"
#include "system.h"
#include "disk.h"
#include "bitmap.h"

#define NumPointersPerIndirect 32



class IndirectPointerBlock{
public:
    void Deallocate(BitMap *bitMap);
    void FetchFrom(int sectorNumber); 	
    void WriteBack(int sectorNumber);
	void PutSector(int sector);
	int	getNumFreePointers();
    int ByteToSector(int offset);	// Convert a byte offset into the file
									// to the disk sector containing
									// the byte	
	void clear();

private:

    int dataSectors[NumPointersPerIndirect];		// Disk sector numbers for each data
                                        // block in the file
	int findNextEmptyPointer();		// Find and return the next empty block pointer






};
